From: Florian Müllner Date: Fri, 23 Nov 2018 16:57:59 +0000 (+0100) Subject: notificationDaemon: Fix warning X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~154 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e0a992af7353;p=gnome-shell.git notificationDaemon: Fix warning Since commit 33b8537bf5, we unconditionally access the 'image-path' hint, resulting in a gjs warning if the hint is not defined. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index b897b8a71..0e5f8fcc2 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -77,8 +77,10 @@ var FdoNotificationDaemon = new Lang.Class({ bitsPerSample, nChannels, data] = hints['image-data']; return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, bitsPerSample, width, height, rowStride); + } else if (hints['image-path']) { + return this._iconForNotificationData(hints['image-path']; } - return this._iconForNotificationData(hints['image-path']); + return null; }, _fallbackIconForNotificationData(hints) {